package com.xwdeshj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 轮播图管理信息
 */
@Entity(name = "xw_banner")
public class XwBanner {

    @Column(name = "banner_Id")
    private Integer bannerId;

    /**
     * 轮播加密id
     */
    @Column(name = "banner_encryptId")
    private String bannerEncryptid;

    /**
     * 轮播图（单图）
     */
    @Column(name = "banner_img")
    private String bannerImg;

    /**
     * 描述
     */
    @Column(name = "banner_desc")
    private String bannerDesc;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "banner_updatetime")
    private Date bannerUpdatetime;

    /**
     * 提交时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "banner_createtime")
    private Date bannerCreatetime;

    public XwBanner(){

    }

    public XwBanner(String bannerEncryptid, String bannerImg, String bannerDesc, Date bannerUpdatetime, Date bannerCreatetime) {
        this.bannerEncryptid = bannerEncryptid;
        this.bannerImg = bannerImg;
        this.bannerDesc = bannerDesc;
        this.bannerUpdatetime = bannerUpdatetime;
        this.bannerCreatetime = bannerCreatetime;
    }


    /**
     * @return banner_Id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getBannerId() {
        return bannerId;
    }

    /**
     * @param bannerId
     */
    public void setBannerId(Integer bannerId) {
        this.bannerId = bannerId;
    }

    /**
     * 获取轮播加密id
     *
     * @return banner_encryptId - 轮播加密id
     */
    public String getBannerEncryptid() {
        return bannerEncryptid;
    }

    /**
     * 设置轮播加密id
     *
     * @param bannerEncryptid 轮播加密id
     */
    public void setBannerEncryptid(String bannerEncryptid) {
        this.bannerEncryptid = bannerEncryptid;
    }

    /**
     * 获取轮播图（单图）
     *
     * @return banner_img - 轮播图（单图）
     */
    public String getBannerImg() {
        return bannerImg;
    }

    /**
     * 设置轮播图（单图）
     *
     * @param bannerImg 轮播图（单图）
     */
    public void setBannerImg(String bannerImg) {
        this.bannerImg = bannerImg;
    }

    /**
     * 获取描述
     *
     * @return banner_desc - 描述
     */
    public String getBannerDesc() {
        return bannerDesc;
    }

    /**
     * 设置描述
     *
     * @param bannerDesc 描述
     */
    public void setBannerDesc(String bannerDesc) {
        this.bannerDesc = bannerDesc;
    }

    /**
     * 获取更新时间
     *
     * @return banner_updatetime - 更新时间
     */
    public Date getBannerUpdatetime() {
        return bannerUpdatetime;
    }

    /**
     * 设置更新时间
     *
     * @param bannerUpdatetime 更新时间
     */
    public void setBannerUpdatetime(Date bannerUpdatetime) {
        this.bannerUpdatetime = bannerUpdatetime;
    }

    /**
     * 获取提交时间
     *
     * @return banner_createtime - 提交时间
     */
    public Date getBannerCreatetime() {
        return bannerCreatetime;
    }

    /**
     * 设置提交时间
     *
     * @param bannerCreatetime 提交时间
     */
    public void setBannerCreatetime(Date bannerCreatetime) {
        this.bannerCreatetime = bannerCreatetime;
    }


    @Override
    public String toString() {
        return "XwBanner{" +
                "bannerId=" + bannerId +
                ", bannerEncryptid='" + bannerEncryptid + '\'' +
                ", bannerImg='" + bannerImg + '\'' +
                ", bannerDesc='" + bannerDesc + '\'' +
                ", bannerUpdatetime=" + bannerUpdatetime +
                ", bannerCreatetime=" + bannerCreatetime +
                '}';
    }
}